UNPKG

marko

Version:

UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.

16 lines (12 loc) 347 B
import { types as t } from "@marko/compiler"; import write from "../util/html-out-write"; import withPreviousLocation from "../util/with-previous-location"; export default function (path) { const { node } = path; path.replaceWith( withPreviousLocation( write`<![CDATA[${t.stringLiteral(node.value)}]]>`, node, ), ); }